package com.aaa.bookproject.service.impl;

import com.aaa.bookproject.entity.TMenu;
import com.aaa.bookproject.dao.TMenuMapper;
import com.aaa.bookproject.service.ITMenuService;
import com.aaa.bookproject.util.ResultData;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author LvYongQi
 * @since 2021-05-09
 */
@Service
public class TMenuServiceImpl extends ServiceImpl<TMenuMapper, TMenu> implements ITMenuService {

    @Resource
    private TMenuMapper menuMapper;
    @Resource
    private ResultData resultData;

    @Override
    public ResultData getAllMenu() {
        List<TMenu> menuList = menuMapper.getAllMenu();
        resultData.setData(menuList);
        return resultData;
    }
}
